package imu.g3.controller;

import imu.g3.model.LoginLogInfo;
import imu.g3.model.MyProjectUploadFiles;
import imu.g3.service.SystemLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
@RequestMapping("/log")
public class SystemLogController {


    @Autowired
    private SystemLogService systemLogService;
    /**
     * 查询所有的登录系统日志
     * @return
     */
    public List<LoginLogInfo> getLoginLog(){
        List<LoginLogInfo> LoginLogInfoList = systemLogService.getLoginLog();
        return LoginLogInfoList;

    }

    /**
     * 新增登录系统日志
     * @return
     */
    public void addLoginLog(LoginLogInfo loginLogInfo){
        systemLogService.addLoginLog(loginLogInfo);
    }

    @RequestMapping("getAllLoginLog")
    public String getAllFiles(HttpServletRequest request){
        return "loginLog";
    }


}
